let MAILER_CONFIG = {};

MAILER_CONFIG = {
    host: 'smtp.163.com',
    // secureConnection: true,
    secure: true,
    port: 465,
    auth: {
        user: '17677100894@163.com',
        pass: 'WYYDAIPFNCJHBAFD'
    }
}

function Option({
    username,
    type,
    email,
    checkCode
}) {
    return {
        from: '17677100894@163.com',
        to: `${email}`,
        subject: '网上商城',
        html: `
        <div style="width: 600px; margin:30px auto">
            <h2 style="text-align:center;">亲爱的${username},您正在进行${type}操作</h2>
            <p sty1e=" font-size: 24px">此次的验证码如下:</p><strong style="font-size:20px; display:block;text-align :
                center;color: red">${checkCode}</strong>
            <p>验证码15分钟有效，请及时输入</p><i style="color:#00bfff">此邮件为系统自动发送，请勿回复!若非本人请忽略。</i>
            <p sty1e="text-align :right">--网上商城</p>
        </div>
        `
    }

}


module.exports = {
    MAILER_CONFIG,
    Option
}